import request from '@/utils/request'

export function fetchList(query) {
  if(query != undefined){
    query = JSON.parse(JSON.stringify(query))
  }
  return request({
    url: '/feedback/getList',
    method: 'post',
    data: query
  })
}

export function fetchMission(id) {
  return request({
    url: '/feedback/getDetail',
    method: 'post',
    data: { id }
  })
}

export function saveFeedback(formdata) {
  return request({
    url: '/feedback/save',
    method: 'post',
    data: formdata
  })
}

export function withdrawFeedbackByID(id) {
  return request({
    url: '/feedback/withdraw',
    method: 'post',
    data: id
  })
}

export function removeFeedbackByID(id) {
  return request({
    url: '/feedback/delete',
    method: 'post',
    data: id
  })
}
export function sendFeedbackByID(id) {
  return request({
    url: '/feedback/send',
    method: 'post',
    data: id
  })
}

export function confirmFeedbackByID(id) {
  return request({
    url: '/feedback/confirm',
    method: 'post',
    data: id
  })
}

